#include "nntp.h"
#include "database.h"
#include "server.h"

class ServerNNTP : public NNTP {
	public:
	ServerNNTP();
	bool receive(string&, Connection*);
	void destroy(void);
	void run();
	private:
	bool answer(string&, vector<string>&, vector<unsigned int>&);
	void ack(string&);
	void nack_not_ng(string&);
	void nack_already_ng(string&);
	void nack_not_art(string&);

	Server 		the_server;
	Database*	ng;
	Connection* 	connection;	
};
